package com.seckill.api.dto.item;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;


@Data
public class ItemSimpleInfoDTO {
    @ApiModelProperty("商品id")
    private Long id;
    @ApiModelProperty("商品名称")
    private String name;
    @ApiModelProperty("封面url")
    private String image;
    @ApiModelProperty("价格")
    private Integer price;
    @ApiModelProperty("商品状态")
    private Integer status;
    @ApiModelProperty("一级分类id")
    private Long firstCateId;
    @ApiModelProperty("二级分类id")
    private Long secondCateId;
    @ApiModelProperty("三级分类id")
    private Long thirdCateId;
    @JsonIgnore
    public List<Long> getCategoryIds(){
        return List.of(firstCateId, secondCateId, thirdCateId);
    }
}
